﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Iguana.Core.HypterText
{
    public static class UtilAttributes
    {

        /// <summary>
        /// Returns a full list of all XHTML attributes supported by Iguana.
        /// </summary>
        /// <returns></returns>
        public static List<IAttribute> GetAvailableAttributes()
        {
            List<IAttribute> _returnAttributes = new List<IAttribute>();

            Type[] typeList = UtilDocTypes.GetTypesInNamespace(Assembly.GetExecutingAssembly(), "Iguana.Core.HypterText.Attributes");

            for (int x = 0; x < typeList.Length; x++)
            {
                _returnAttributes.Add((IAttribute)System.Reflection.Assembly.GetExecutingAssembly().CreateInstance(typeList[x].FullName));
            }

            return _returnAttributes;
        }

    }
}
